package com.ks.member.controller;


import com.ks.core.base._ControllerBase;
import com.ks.core.core.Result;
import com.ks.member.aop.Author;
import com.ks.member.controller.dto.LoginRequest;
import com.ks.member.controller.dto.MemberThirfAuthorDto;
import com.ks.member.entity.MemberBase;
import com.ks.member.entity.MemberLevel;
import com.ks.member.entity.MemberThirdAuthor;
import com.ks.member.service.IMemberThirdAuthorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 * 第三方系统授权绑定信息 前端控制器
 * </p>
 *
 * @author kingdee123
 * @since 2020-12-24
 */
@RestController
@RequestMapping("/memberThirdAuthor")
@Api(value = "小程序管理模块", description = "小程序管理模块")
public class MemberThirdAuthorController extends _ControllerBase {
    @Autowired
    private IMemberThirdAuthorService iMemberThirdAuthorService;
    @PostMapping("/addMemberThirdAuthor")
    @ApiOperation(value = "小程序注册会员", notes = "小程序注册会员")
    @Author
    public Object addMemberThirdAuthor(@RequestBody LoginRequest request) {
        Map<String, Object> map = iMemberThirdAuthorService.addMemberThirdAuthor(request.getOpenId(),request.getUnionId(),request.getTenantId(),request.getMobile());
        return Result.success(map);
    }
}

